﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OA.Models
{
    public class MenuItem
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [DisplayName("菜单项名")]
        public string Name { get; set; }
        [DefaultValue(0)]
        [DisplayName("排序")]
        public int Sort { get; set; }
        [DisplayName("链接")]
        public string Route { get; set; }

        [DisplayName("所属菜单")]
        public int MenuId { get; set; }
        [ForeignKey("MenuId")]
        [DisplayName("所属菜单")]
        public virtual Menu Menu { get; set; }
    }
}